package com.mbti.youmore.service;

import com.mbti.youmore.entity.Like;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author Guqier
* @description 针对表【t_like】的数据库操作Service
* @createDate 2024-05-08 21:19:11
*/
public interface LikeService extends IService<Like> {

    @Transactional
//开启事务
    boolean giveLike(Integer postId, Integer userId);

    List<Integer> getLikeUserIdByPostId(Integer postId);

    boolean deleteLike(Integer postId, Integer userId);

    boolean giveCommentLike(Integer userId, Integer commentId);

    boolean deleteCommentLike(Integer userId, Integer commentId);
}
